<div class="row">
	<div class="col-md-12">
		<div class="alert alert-danger alert-dismissible" role="alert">
			<h3>
				<strong>警告</strong>
			</h3>
			<ol>
				<li>删除的数据将无法恢复。所以，在删除数据前请认真确认！</li>
				<li>所有的数据操作，系统都将以日志的形式进行记录，稍后可以在日志列表中查看！</li>
			</ol>
			<h3>
				<strong>说明</strong>
			</h3>
			<ol>
				<li>您可以根据【编号】，或者【名称】查询相关数据。</li>
			</ol>
		</div>
	</div>
</div>

<form id="search">
	<div class="row">
		<div class="col-md-8 col-md-offset-2 text-success" style="margin-bottom: 10px;">
			<label class="radio-inline"> <input type="radio" name="type" value="c" ${((type== 'c')?string('checked="checked" ',''))!'checked="checked" '} /> 合同数据
			</label> <label class="radio-inline"> <input type="radio" name="type" value="b" ${((type== 'b')?string('checked="checked" ',''))!''} /> 投标数据
			</label>
		</div>
		<div class="col-md-8 col-md-offset-2">
			<div class="form-group has-success text-success">
				<div class="input-group">
					<input type="text" class="form-control input-lg" name="key" style="height: 50px; font-weight: bold;" /> <span class="input-group-addon btn btn-for-search"> <i class="icon-search icon-2x" style="margin: 0 20px;" style="border: none; background-color: none;"></i>
					</span>
				</div>
			</div>
		</div>
		<div class="col-md-8 col-md-offset-2">
			<small> <a href="javascript:;" class="dm-op-logs">
					<i class="icon-double-angle-right"></i>
					操作日志
				</a>
			</small>
		</div>
	</div>
</form>

<script type="text/javascript">
	require([ 'suredy' ], function() {
		$('[name="key"]').focus();

		var submit = function() {
			var param = {
				type : $('[name="type"]:checked').val(),
				key : $('[name="key"]').val()
			};

			Suredy.loadContent('${request.contextPath}/dm/search', {
				postData : param
			});
		}

		$('.btn-for-search').on('click', function(event) {
			submit();
			return true;
		});

		$('[name="key"]').on('keypress', function(event) {
			if (event.keyCode === 13) {
				submit();
				return false;
			}

			return true;
		});

		$('[name="type"]').on('click', function() {
			$('[name="key"]').focus();
			return true;
		});

		$('a.dm-op-logs').on('click', function() {
			Suredy.loadContent('${request.contextPath}/dm/op-logs');
		});
	});
</script>
